#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pii pair<int,int>
#define pb push_back
#define vec vector<int>
#define y1 y_____hahahaha_____1

using namespace std;

typedef long long ll;
typedef double db;
typedef unsigned long long ull;
typedef long double ldb;

int read(){int x = 0,sgn = 1;char ch = getchar();for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;for(;isdigit(ch);ch = getchar()) x = (x << 1) + (x << 3) + (ch ^ 48); return x * sgn;}

const int N = 4e5+10;

int n,a[N],stk[N],top;
pii b[N];
bool op[N];
char ans[N];

int main(){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in << 1;
	for(int i = 1;i <= n;i++) a[i] = in,b[i].fi = a[i],b[i].se = i;
	sort(b + 1,b + n + 1);
	for(int i = 1;i <= n / 2;i++) op[b[i].se] = 1;
	for(int i = 1;i <= n;i++){
		if(top && op[stk[top]] ^ op[i]) ans[stk[top]] = '(',ans[i] = ')',top--;
		else stk[++top] = i;
	}
	printf("%s",ans + 1);
	return 0;
}
